import axios from "axios";

const service = axios.create({
  baseURL: "http://127.0.0.1:8000/",
});

// 请求拦截器
service.interceptors.request.use(
  (config) => {
    return config; // 必须返回配置
  },
  (error) => {
    return Promise.reject(error);
  }
);

// 响应拦截器
service.interceptors.response.use((response) => {
  return response.data;
});

export default service;
